﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dreamz
{
    public class Rum10
    {
        static public void Apply()
        {
           //adds methods invoked through using lever, and taking jaws.
            GameEngine.S.World[3, 3].Items["lever"].OnUse += new EventHandler(UseLever);
            GameEngine.S.World[3, 3].Items["jaws"].OnTake += new EventHandler(TakeJaws);
            GameEngine.GameState.leverMovable = false;
        }
        static public void TakeJaws()
        {
           //This gives the sad news that your character have died, and resets the game.
            UI.Console.Clear();
            UI.Console.Write("[GAME OVER]", ConsoleColor.Red);
            UI.Console.WriteLine(@"As you try to pick the jaws up, you accidentaly slit your wrist on the sharp stone.");
            UI.Draw();
            Console.ReadKey();
            Console.Clear();
            GameEngine.S.Menu();
        }
        static public void UseLever()
        {
            //Events to come when using lever in room 10. Adds a new exit and sends a text.
            if (GameEngine.GameState.leverMovable == true)
            {
                UI.Console.WriteLine("You move the tounge with a mighty heave. The lion seem to melt away, fading into the wall.\nAs the lion merges fully with the wall, a big hole emerges. Where does it lead?\nYou may now go to the [north]");
                GameEngine.S.World[3, 3].Description = "You see a lion-shaped hole in the wall.\n";
                GameEngine.S.World[3, 3].North = true;
            }
            else
            {
                UI.Console.WriteLine("The lever is not movable right now. Maybe there is something you have missed?");
            }
        }
    }
}